﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowAPI
{
    public class ApiTextBox : System.Windows.Forms.TextBox
    {
        public ApiTextBox()
        {
            this.TextChanged += new System.EventHandler(TextBox_Changed);
        }

        private void TextBox_Changed(object sender, EventArgs e)
        {
            string s = this.Text;
            if (s.Length > 1)
            {
                s = s.Substring(s.Length - 1);
            }
            this.Text = s.ToUpper();
        }
    }
}
